#ifndef PAGEWIDGET_H
#define PAGEWIDGET_H

#include <QWidget>
#include <QObject>
#include <QLabel>
#include <QSettings>
#include <pageandview/pagemanager.h>
#include <pageandview/viewmanager.h>

class ViewManager;

class PageWidget : public QWidget
{
    Q_OBJECT
public:
    explicit PageWidget(QWidget *parent = 0, QString pageName = "Null");
    void split(Qt::Orientation orientation);
    void setCurrentPlugin(IPluginGadget *pluginconfig);
    void saveSettings(QSettings* qs = 0);
    void readSettings(QSettings* qs = 0);
    ViewManager * currentViewManager();
    QString name() const { return m_pageName; }

signals:
    void currentPluginChanged(IPluginGadget *pluginconfig);

public slots:
    void closeView(ViewWidget *view);

private:
    ViewManager * m_headViewManager;

    ViewManager * m_oldViewManager;
    ViewManager * m_curViewManager;
    IPluginGadget * m_curGadget;

    QString m_pageName;
};

#endif // PAGEWIDGET_H
